/* hfetcher_error_codes.h - Error code definitions

    HTTP Fetcher
    Copyright (C) 2001, 2003 Lyle Hanson (lhanson@users.sourceforge.net)

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    See LICENSE file for details

 */

#ifndef HFETCHER_ERROR_CODES_H
#define HFETCHER_ERROR_CODES_H

/* Error sources */
enum hf_err_source {
    FETCHER_ERROR   = 0,
    ERRNO           = 1,
    H_ERRNO         = 2,
    HF_WINSOCK_ERROR = 3
};

enum hf_err_code {
/* HTTP Fetcher error codes */
    HF_SUCCESS      = 0,
    HF_METAERROR    = 1,
    HF_NULLURL      = 2,
    HF_PORTERROR    = 3,
    HF_HEADTIMEOUT  = 4,
    HF_DATATIMEOUT  = 5,
    HF_FRETURNCODE  = 6,
    HF_CRETURNCODE  = 7,
    HF_CONTENTLEN   = 8,
    HF_NULLPTR      = 9,
    HF_HERROR       = 10
#ifdef WIN32
    ,
    HF_WINSOCK_SELECT = 11,
    HF_WINSOCK_STARTUP = 12,
    HF_WINSOCK_GETHBN = 13
#endif
};

#endif
